import apibase from "@/api/apiBase";
import axios from "axios";
import { piccInvoiceCreateInterface, piccInvoiceDetailInterface } from "./applyInvoice.interface";

//未开票保单列表
export const $getChooseList = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/travel/api/piccInvoice/chooseList',
    data: params,
    instance,
  });
}

//开具发票
export const $piccInvoiceCreate = (params: piccInvoiceCreateInterface) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/travel/api/piccInvoice/create',
    data: params,
    instance,
  });
}

//发票列表
export const $getPiccInvoiceList = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/travel/api/piccInvoice/list',
    data: params,
    instance,
  });
}

//发票单详情
export const $getPiccInvoiceDetail = (params:piccInvoiceDetailInterface) =>{
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/travel/api/piccInvoice/detail',
    data: params,
    instance,
  });
}
